#include <stdio.h>
#include <stdlib.h>

int funtest(int, int, int(int, int));
int max(int, int);
int min(int, int);
int sum(int, int);
int main(int argc, char *argv[]) {
  /* 回调函数
   */
  printf("请输入两个数：");
  int a;
  int b;
  scanf("%d %d", &a, &b);
  int rlt = funtest(a, b, max);
  printf("max = %d\n", rlt);
  rlt = funtest(a, b, min);
  printf("min = %d\n", rlt);
  rlt = funtest(a, b, sum);
  printf("sum = %d\n", rlt);
  return EXIT_SUCCESS;
}

// 回调函数
int funtest(int x, int y, int Callback(int, int)) { return Callback(x, y); }
int max(int a, int b) { return a > b ? a : b; }
int min(int a, int b) { return a < b ? a : b; }
int sum(int a, int b) { return a + b; }
